Check CPython repo branch and age #334
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #333.
Add two new checks near the start of the release process.
First, check the branch. We should be on
mainfor an alpha, otherwise on the relevant3.xbranch.This fails the release process if you're on the wrong branch, so you need to switch your repo to the right branch.
Second, check the repo age. If the last commit is more than a day old, you're asked "Continue with old repo?".
It doesn't fail outright for an old repo. If you releasing a security branch, I can imagine the last commit was some time ago. I expect bugfix+prereleases will have commits within a day.
Future ideas.
We could go further and have the script automatically switch the repo to the correct branch, and also do
git fetch/pull.It could also clean the repo first (
git clean -fdx).We could even, like on CI, have it create a fresh clone (although it's a big repo and slow to clone).
Personally, I do releases against a different clone than my normal dev clone, so these would be okay; I've nothing important in the release repo.
But let's go with these simpler checks first, they'll help a lot.